function school_city_choose(){
	$.post("/school/school_class_josn",{
		id:$("#school_city").val()
	},
	function(result){    
		if(result!=""){ 
			$("#school_class").html(result);
		}
	}); 
}

function school_class_choose(){
	$.post("/school/school_josn",{
		school_city:$('#school_city').find("option:selected").text(),
		school_class:$('#school_class').find("option:selected").text()
	},
	function(result){    
		if(result!=""){ 
			$("#school").html(result);
		}
	}); 
}
function school_choose(){
	$('#school_value').val($('#school').find("option:selected").text());
}
function show_school(id){
	$('#school_value').val($('#'+id).val());
	$('#school_select').dialog({
		autoOpen: true,
		modal: true,
		width: 480,
		buttons: {
			"確定": function () {
				if($('#school_value').val()!="")
					$('#'+id).val($('#school_value').val());
				$(this).dialog("close");
			},
			"取消": function () {
				$(this).dialog("close");
			}
		}
	});

}

function elementary_school_city_choose(){
	$.post("/school/school_josn",{
		school_city:$('#elementary_school_city').find("option:selected").text(),
		school_class:'國小'
	},
	function(result){    
		if(result!=""){ 
			$("#elementary_school").html(result);
		}
	}); 
}
function elementary_school_choose(){
	$('#elementary_school_value').val($('#elementary_school').find("option:selected").text());
}
function show_elementary_school(id){
	$('#elementary_school_value').val($('#'+id).val());
	$('#elementary_school_select').dialog({
		autoOpen: true,
		modal: true,
		width: 380,
		buttons: {
			"確定": function () {
				if($('#elementary_school_value').val()!="")
					$('#'+id).val($('#elementary_school_value').val());
				$(this).dialog("close");
			},
			"取消": function () {
				$(this).dialog("close");
			}
		}
	});

}


function junior_school_city_choose(){
	$.post("/school/school_josn",{
		school_city:$('#junior_school_city').find("option:selected").text(),
		school_class:'國中'
	},
	function(result){    
		if(result!=""){ 
			$("#junior_school").html(result);
		}
	}); 
}
function junior_school_choose(){
	$('#junior_school_value').val($('#junior_school').find("option:selected").text());
}
function show_junior_school(id){
	$('#junior_school_value').val($('#'+id).val());
	$('#junior_school_select').dialog({
		autoOpen: true,
		modal: true,
		width: 380,
		buttons: {
			"確定": function () {
				if($('#junior_school_value').val()!="")
					$('#'+id).val($('#junior_school_value').val());
				$(this).dialog("close");
			},
			"取消": function () {
				$(this).dialog("close");
			}
		}
	});

}

function senior_middle_school_city_choose(){
	$.post("/school/school_josn",{
		school_city:$('#senior_middle_school_city').find("option:selected").text(),
		school_class:'高中'
	},
	function(result){    
		if(result!=""){ 
			$("#senior_middle_school").html(result);
		}
	}); 
}
function senior_middle_school_choose(){
	$('#senior_middle_school_value').val($('#senior_middle_school').find("option:selected").text());
}
function show_senior_middle_school(id){
	$('#senior_middle_school_value').val($('#'+id).val());
	$('#senior_middle_school_select').dialog({
		autoOpen: true,
		modal: true,
		width: 380,
		buttons: {
			"確定": function () {
				if($('#senior_middle_school_value').val()!="")
					$('#'+id).val($('#senior_middle_school_value').val());
				$(this).dialog("close");
			},
			"取消": function () {
				$(this).dialog("close");
			}
		}
	});

}
